#include<iostream>
#include<array>
using namespace std;

int Fill_array(array<double,10>&);

void Show_array(array<double,10>&, int);

void Reverse_array(array<double,10>&, int);

int main()
{
    array<double,10>arr;
    int size = Fill_array(arr);
    cout << "The length of the array:" << size << endl;
    Show_array(arr,size);
    Reverse_array(arr,size);

    return 0;
}
int Fill_array(array<double,10>&a)
{
    cout << "Please enter numbers stored in the arr array,enter no number or stop:";
    int i = 0;
    while( cin >> a[i] && i < 10)
    {
    i++;
    cout << "Enter again:";
    }
    return i;
}

void Show_array(array<double,10>&a, int b)
{
    cout << "The array is shown next:" << endl;
    for ( int i = 0 ; i < b; i++)
    cout << "#" << i+1 <<": " << a[i] << endl;
}

void Reverse_array(array<double,10>&a,int b)
{
    int right = 0;
    int left = b;
 
    while ( right < left)
    {
        a[right] = a[left];
        right++;
        left--;
    }

    cout << "Next show the array after the transpose:" << endl;
    for ( int i = 1; i < b-1; i++)
    cout << "#" << i + 1 << ": " << a[i] << endl;
}